package cn.qh.com.dto;

import java.util.Date;


import java.io.Serializable;

import cn.qh.com.annotationverification.group.AddGroup;
import cn.qh.com.annotationverification.group.UpdateGroup;
import lombok.*;

import java.util.Date;

import io.swagger.annotations.ApiModel;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 属性分组(PmsAttrGroup)表实体类
 *
 * @author makejava
 * @since 2021-11-29 16:32:14
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel
@SuppressWarnings("serial")
public class PmsAttrGroupDTO implements Serializable {
    @Null(message = "新增属性分组时,分组的ID必须为空", groups = AddGroup.class)
    @NotNull(message = "更新属性分组时,分组的ID不能为空", groups = UpdateGroup.class)
    @ApiModelProperty(name = "attrGroupId", value = "分组id", dataType = "java.lang.Long")
    private Long attrGroupId;    //分组id


    @ApiModelProperty(name = "attrGroupName", value = "组名", dataType = "java.lang.String")
    @NotBlank(message = "属性组名不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String attrGroupName;    //组名


    @ApiModelProperty(name = "sort", value = "排序", dataType = "java.lang.Integer")
    @Min(value = 0, message = "排序的值不能小于0", groups = {AddGroup.class, UpdateGroup.class})
    private Integer sort;    //排序


    @ApiModelProperty(name = "descript", value = "描述", dataType = "java.lang.String")
    @NotBlank(message = "属性组描述不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String descript;    //描述


    @ApiModelProperty(name = "icon", value = "组图标", dataType = "java.lang.String")
    private String icon;    //组图标


    @ApiModelProperty(name = "catelogId", value = "所属分类id", dataType = "java.lang.Long")
    @NotNull(message = "属性组的分类ID不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private Long catelogId;    //所属分类id
}

